var __extends =
    (this && this.__extends) ||
    (function () {
      var t = function (e, a) {
        return (t =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (t, e) {
              t.__proto__ = e;
            }) ||
          function (t, e) {
            for (var a in e)
              Object.prototype.hasOwnProperty.call(e, a) && (t[a] = e[a]);
          })(e, a);
      };
      return function (e, a) {
        function n() {
          this.constructor = e;
        }
        if ("function" != typeof a && null !== a)
          throw new TypeError(
            "Class extends value " + String(a) + " is not a constructor or null"
          );
        t(e, a),
          (e.prototype =
            null === a
              ? Object.create(a)
              : ((n.prototype = a.prototype), new n()));
      };
    })(),
  ReceiveAwardDialog = (function (t) {
    function e() {
      var e = t.call(this) || this;
      return (
        e.btn_reward_sure.on(Laya.Event.CLICK, e, e.onDidClickRewardAction),
        e.list_award.on(Laya.Event.CLICK, e, e.onDidClickRewardAction),
        e.img_bg.on(Laya.Event.CLICK, e, e.onDidClickRewardAction),
        e
      );
    }
    return (
      __extends(e, t),
      (e.showReceiveAwardDialog = function (t) {
        null == this.awardV &&
          ((this.awardV = new e()), (this.awardV.zOrder = 1e3)),
          this.awardV.popup(!0),
          (this.awardV.awardObj = t);
        for (var a, n = t.p.split("；"), o = [], r = 0; r < n.length; r++) {
          (a = { label_rewardmsg: { text: n[r] } }), o.push(a);
        }
        (this.awardV.list_award.array = o),
          Laya.stage.event("GameMainView", "exp"),
          Laya.stage.event("HomePageView", "exp");
      }),
      (e.prototype.onDidClickRewardAction = function () {
        this.close(),
          CommunicateDialog.showNextCommunicationDialog(this.awardObj);
      }),
      (e.close = function () {
        this.awardV && (this.awardV.removeSelf(), (this.awardV = null));
      }),
      e
    );
  })(ui.common.ReceiveAwardDialogUI);
